package org.dromara.business.domain.bo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.business.domain.LzshBusinessInfo;
import org.dromara.business.domain.LzshTemplate;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;

import java.math.BigDecimal;
import java.util.List;

/**
 * business信息业务对象 businessinfo
 *
 * @author sxl
 * @date 2024-08-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = LzshBusinessInfo.class, reverseConvertGenerate = false)
public class LzshBusinessInfoBo extends BaseEntity {

    /**
     * id
     */
    @NotNull(message = "不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 模板id
     */
    @NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long templateId;

    /**
     * 菜单id
     */
    @NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long menuId;

    /**
     * 菜单名
     */
    private String menuName;

    /**
     * 模板对象
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private LzshTemplate template;


    /**
     * 用户信息
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> userInfo;

    /**
     * 商业地址
     */
    @NotBlank(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private String businessAddress;

    /**
     * 经度
     */
    @NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal latitude;

    /**
     * 纬度
     */
    @NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal longitude;

    /**
     * 老套餐
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<List<String>> oldPlans;

    /**
     * 新套餐
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<List<List<String>>> newPlans;

}
